$(document).ready(function () {
    // 注册
    $("#btn_info").click(function () {
        var fd = new FormData(document.getElementById('lycms-infoedit'));
        $.ajax({
            url: '/v1/user/action/system/infoedit',
            type: 'POST',
            timeout: 5000,
            dataType: 'json',
            contentType: 'application/x-www-form-urlencoded;charset=utf-8',
            data: fd,
            contentType: false, //不设置内容类型
            processData: false, //不处理数据
            success: function (data) {
                if (data.code == 200) {
                    layer.msg(data.msg, {
                        time: 1500
                    }, function () {
                        location.reload();
                    });
                } else {
                    layer.msg(data.msg);
                    $('#captchaPic').click();
                }
            },
            error: function (XMLResponse) {
                $('#captchaPic').click();
            }
        });
    });
});


/**
  function () {
      self.location.href = "/user/login.html"
  }
 */